from collections import namedtuple
#具名元组    ------拥有字段名的元组
City = namedtuple('City','name country population coordinates')   #类
tokyo = City('tokyo','JP', 36.933,(35.689766,139.691667))         #对象
print(tokyo)
print(tokyo.population)
print(tokyo[1])
print(City._fields)   #返回一个包含这个类所有字段名称的元组



LatLong = namedtuple('LatLong', 'lat long')
